package com.campus.customer.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.campus.common.mybatis.entity.IntegerIdBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 商户表
 * </p>
 *
 * @author ZhaoYuJie
 * @since 2025-04-02
 */
@Getter
@Setter
@TableName("merchant")
@ApiModel(value = "Merchant对象", description = "商户表")
public class Merchant extends IntegerIdBaseEntity<Merchant> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("商家用户ID")
    @TableField("merchant_user_id")
    private Integer merchantUserId;

    @ApiModelProperty("子商户号")
    @TableField("sub_mchid")
    private String subMchid;

    @ApiModelProperty("商户名称")
    @TableField("name")
    private String name;

    @ApiModelProperty("商户Logo")
    @TableField("logo")
    private String logo;

    @ApiModelProperty("所属食堂ID")
    @TableField("canteen_id")
    private Integer canteenId;

    @ApiModelProperty("评分")
    @TableField("rating")
    private BigDecimal rating;

    @ApiModelProperty("备餐时长（分钟）")
    @TableField("base_time")
    private String baseTime;

    @ApiModelProperty("距离（公里），废弃字段，根据用户的实时定位和商户的经纬度动态计算。")
    @TableField("distance")
    private BigDecimal distance;

    @ApiModelProperty("起送价")
    @TableField("min_price")
    private BigDecimal minPrice;

    @ApiModelProperty("配送费")
    @TableField("delivery_fee")
    private BigDecimal deliveryFee;

    @ApiModelProperty("销量")
    @TableField("sales")
    private Integer sales;

    @ApiModelProperty("商户地址")
    @TableField("address")
    private String address;

    @ApiModelProperty("联系电话")
    @TableField("phone")
    private String phone;

    @ApiModelProperty("纬度")
    @TableField("latitude")
    private BigDecimal latitude;

    @ApiModelProperty("经度")
    @TableField("longitude")
    private BigDecimal longitude;

    @ApiModelProperty("状态：1-营业中，0-休息中（根据商户的营业时间动态更新）")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("关闭方式：0-系统自动关闭，1-商户手动关闭")
    @TableField("close_method")
    private Integer closeMethod;

    @ApiModelProperty("是否支持外卖配送：1-支持，0-不支持")
    @TableField("support_delivery")
    private Integer supportDelivery;

    @ApiModelProperty("是否支持堂食：1-支持，0-不支持")
    @TableField("support_dine_in")
    private Integer supportDineIn;

    @ApiModelProperty("是否支持自取：1-支持，0-不支持")
    @TableField("support_takeout")
    private Integer supportTakeout;

    @ApiModelProperty("排序号（花钱买推荐位）")
    @TableField("seq_no")
    private Integer seqNo;

    @ApiModelProperty("排序失效日期")
    @TableField("seq_expire_date")
    private LocalDate seqExpireDate;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @Override
    public Serializable pkVal() {
        return null;
    }
}
